Optimal. Leaf size=205 \[ \frac{\sqrt{2} \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{a^{3/2} n \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{a^{3/2} n \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{2 x^{-n/2}}{a n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.395062, antiderivative size = 205, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.192, Rules used = {1381, 1340, 1122, 1166, 205} \[ \frac{\sqrt{2} \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{a^{3/2} n \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{2} \left (\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}+b\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{\sqrt{b^2-4 a c}+b}}\right )}{a^{3/2} n \sqrt{\sqrt{b^2-4 a c}+b}}-\frac{2 x^{-n/2}}{a n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1381
Rule 1340
Rule 1122
Rule 1166
Rule 205
Rubi steps
\begin{align*} \int \frac{x^{-1-\frac{n}{2}}}{a+b x^n+c x^{2 n}} \, dx &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{a+\frac{c}{x^4}+\frac{b}{x^2}} \, dx,x,x^{-n/2}\right )}{n}\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{x^4}{c+b x^2+a x^4} \, dx,x,x^{-n/2}\right )}{n}\\ &=-\frac{2 x^{-n/2}}{a n}+\frac{2 \operatorname{Subst}\left (\int \frac{c+b x^2}{c+b x^2+a x^4} \, dx,x,x^{-n/2}\right )}{a n}\\ &=-\frac{2 x^{-n/2}}{a n}+\frac{\left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \operatorname{Subst}\left (\int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+a x^2} \, dx,x,x^{-n/2}\right )}{a n}+\frac{\left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \operatorname{Subst}\left (\int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+a x^2} \, dx,x,x^{-n/2}\right )}{a n}\\ &=-\frac{2 x^{-n/2}}{a n}+\frac{\sqrt{2} \left (b-\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{a^{3/2} \sqrt{b-\sqrt{b^2-4 a c}} n}+\frac{\sqrt{2} \left (b+\frac{b^2-2 a c}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{a} x^{-n/2}}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{a^{3/2} \sqrt{b+\sqrt{b^2-4 a c}} n}\\ \end{align*}
Mathematica [C] time = 0.203583, size = 127, normalized size = 0.62 \[ \frac{4 c x^{-n/2} \left (\frac{\, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};\frac{2 c x^n}{\sqrt{b^2-4 a c}-b}\right )}{-b \sqrt{b^2-4 a c}-4 a c+b^2}+\frac{\, _2F_1\left (-\frac{1}{2},1;\frac{1}{2};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{b \sqrt{b^2-4 a c}-4 a c+b^2}\right )}{n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] time = 0.201, size = 268, normalized size = 1.3 \begin{align*} -2\,{\frac{1}{an{x}^{n/2}}}+\sum _{{\it \_R}={\it RootOf} \left ( \left ( 16\,{a}^{5}{c}^{2}{n}^{4}-8\,{a}^{4}{b}^{2}c{n}^{4}+{a}^{3}{b}^{4}{n}^{4} \right ){{\it \_Z}}^{4}+ \left ( 12\,{a}^{2}b{c}^{2}{n}^{2}-7\,a{b}^{3}c{n}^{2}+{b}^{5}{n}^{2} \right ){{\it \_Z}}^{2}+{c}^{3} \right ) }{\it \_R}\,\ln \left ({x}^{{\frac{n}{2}}}+ \left ( -8\,{\frac{{a}^{5}{n}^{3}{c}^{2}}{a{c}^{3}-{b}^{2}{c}^{2}}}+6\,{\frac{{n}^{3}{b}^{2}{a}^{4}c}{a{c}^{3}-{b}^{2}{c}^{2}}}-{\frac{{n}^{3}{b}^{4}{a}^{3}}{a{c}^{3}-{b}^{2}{c}^{2}}} \right ){{\it \_R}}^{3}+ \left ( -5\,{\frac{{a}^{2}b{c}^{2}n}{a{c}^{3}-{b}^{2}{c}^{2}}}+5\,{\frac{a{b}^{3}cn}{a{c}^{3}-{b}^{2}{c}^{2}}}-{\frac{{b}^{5}n}{a{c}^{3}-{b}^{2}{c}^{2}}} \right ){\it \_R} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{2}{a n x^{\frac{1}{2} \, n}} - \int \frac{c x^{\frac{3}{2} \, n} + b x^{\frac{1}{2} \, n}}{a c x x^{2 \, n} + a b x x^{n} + a^{2} x}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.99945, size = 2527, normalized size = 12.33 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{x^{-\frac{1}{2} \, n - 1}}{c x^{2 \, n} + b x^{n} + a}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]